<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style type="text/css" media="screen">
        html { height:100%; }
        body { height:100%; }
    </style>

<title>文档浏览</title>
<link rel="stylesheet" href="/css/theme/bootstrap.min.css" type="text/css" />	
<link rel="stylesheet" href="/css/theme/App.css" type="text/css" />
<link rel="stylesheet" href="/css/theme/custom.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="/css/flexpaper.css" />
<script src="/javascript/theme/libs/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="/javascript/flexpaper.js"></script>
<script type="text/javascript" src="/javascript/flexpaper_handlers.js"></script>
</head>
<body style="overflow-y:hidden">
<div id="content" style="width:90%; margin: 0 auto;">

			<div class="portlet">
				<div class="portlet-header">
    				<h3>
    				<i class="fa fa-tasks"></i>
    				$!fileName
    				</h3>

    			</div> <!-- /.portlet-header -->
    		</div>
			
			
			<input type="hidden" id="srcFile" name="srcFile" value="$!srcFile" />    		

			<div id="documentViewer" class="flexpaper_viewer" style="height:560px;overflow:hidden;margin: 0 auto; margin: 0 auto;"></div>

<script type="text/javascript">
    function getDocumentUrl(document){
        return "php/services/view.php?doc={doc}&format={format}&page={page}".replace("{doc}",document);
    }

    var startDocument = "Paper";

    $('#documentViewer').FlexPaperViewer(
            { config : {

                SWFFile : $("#srcFile").val(),
                Scale : 1,
                ZoomTransition : 'easeOut',
                ZoomTime : 0.1,
                ZoomInterval : 0.01,
                FitPageOnLoad : false,
                FitWidthOnLoad : false,
                FullScreenAsMaxWindow : false,
                ProgressiveLoading : false,
                MinZoomSize : 0.2,
                MaxZoomSize : 3,
                SearchMatchAll : true,
                InitViewMode : 'Portrait',
                RenderingOrder : 'flash,html5',
                StartAtPage : '',

                ViewModeToolsVisible : true,
                ZoomToolsVisible : true,
                NavToolsVisible : true,
                CursorToolsVisible : true,
                SearchToolsVisible : true,
                WMode : 'window',
                localeChain: 'zh_CN'
            }}
    );
	
	
	$(window).resize(function(){
 		setDivHeight();
	 });
 
	 function setDivHeight() {
		var winH = $(window).height();
		$("#documentViewer").css('height',winH);
	 }
	 
	 setDivHeight();
</script>

</div>
</body>
</html>
